package com.acoffee.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author acoffee
 * @create 2021-11-18 10:33
 */
@Controller
@RequestMapping("/acoffee")
public class MyController {
    @RequestMapping("/firstone")
    public ModelAndView firstone(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("msg","myfirst");
        modelAndView.setViewName("/index.jsp");
        return modelAndView;
    }

    @RequestMapping("/secondone")
    public ModelAndView secondone(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("mysecond");
        modelAndView.setViewName("/index.jsp");
        return modelAndView;
    }
}
